package com.xw.childhealth.service.impl;

import com.xw.childhealth.dao.JieduanKnowledgeDao;
import com.xw.childhealth.entity.JieduanKnowledge;
import com.xw.childhealth.service.JieduanKnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 2019-11-13 11:23
 * @Version: 1.0
 */
@Service
public class JieduanKnowledgeServiceImpl implements JieduanKnowledgeService {

    @Autowired
    private JieduanKnowledgeDao jieduanKnowledgeDao;

    @Override
    public List<JieduanKnowledge> findByParentIdEquals(Integer id) {
        return jieduanKnowledgeDao.findByParentIdEquals(id);
    }

    @Override
    public JieduanKnowledge findByIdEquals(Integer id) {
        return jieduanKnowledgeDao.findByIdEquals(id);
    }

    @Override
    public JieduanKnowledge save(JieduanKnowledge jieduanKnowledge) {
        return jieduanKnowledgeDao.save(jieduanKnowledge);
    }

    @Override
    public void delRecord(Integer id) {
        jieduanKnowledgeDao.deleteById(id);
    }


    @Override
    public List<JieduanKnowledge> findByInformationListEquals(String information) {
        return jieduanKnowledgeDao.findByInformationEquals(information);
    }
}
